<script setup lang="ts">
const props: any = defineProps<{
    ujt: any;
    id?: any;
    popstyle?: any;
    maskstyle?: any;
    fn?: any;
}>();
const { $global } = props.ujt;
// 初始化pop数据
if (!props.id) {
    props.id = 'popdefaulttipconfirm';
}
</script>

<template>
    <PopTip :ujt="ujt" :id="id">
        <template #des>
            <slot name="des"></slot>
        </template>
        <template #pop>
            <div class="as-pop-tipconfirm-pop" v-if="$global.pop[id].stat">
                <div class="as-pop-tipconfirm-content">
                    <slot name="pop"></slot>
                </div>
                <div class="as-pop-tipconfirm-btns">
                    <div v-if="props.fn" @pointerdown="props.fn()">
                        {{ $global?.lang?.asai?.confirm }}
                    </div>
                    <div @pointerdown="$global.pop[id].stat = 0" class="cur">
                        {{ $global?.lang?.asai?.cancel }}
                    </div>
                </div>
            </div>
        </template>
    </PopTip>
</template>

<style scoped lang="scss">
.as-pop-tipconfirm-pop {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--ch0);
    border-radius: 12px 0 12px 12px;
    min-width: 258px;
    .as-pop-tipconfirm-content {
        padding: 12px;
    }
    .as-pop-tipconfirm-btns {
        padding: 12px;
        text-align: center;
        div {
            border-radius: 15px;
            display: inline-block;
            line-height: 38px;
            padding: 0 28px;
            margin: 0 8px;
            cursor: pointer;
            background-color: var(--ch2);
            color: var(--ch8);
        }
        .cur {
            background-color: var(--cm8);
            color: var(--cm0);
        }
    }
}
</style>
